package com.cdu.mapper;

import com.cdu.pojo.entity.Address;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface AddressMapper {
    /**
     * 新增收货地址
     *
     * @param address 收货地址对象
     * @return 受影响的行数
     */
//    @Insert("INSERT INTO t_address (user_id, name, province_name, province_code, city_name, " +
//            "city_code, area_name, area_code, zip, address, phone, tel, tag, is_default, " +
//            "created_user, created_time, modified_user, modified_time) " +
//            "VALUES (#{address.userId}, #{address.name}, #{address.provinceName}, #{address.provinceCode}, " +
//            "#{address.cityName}, #{address.cityCode}, #{address.areaName}, #{address.areaCode}, " +
//            "#{address.zip}, #{address.address}, #{address.phone}, #{address.tel}, #{address.tag}, " +
//            "#{address.isDefault}, #{address.createdUser}, #{address.createdTime}, #{address.modifiedUser}, " +
//            "#{address.modifiedTime})")
    int insertAddress(@Param("address") Address address);
}